package com.big.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.big.app.dao.ShoppingDetailsDao;
import com.big.app.entity.ShoppingDetails;
import com.big.app.service.intf.ShoppingDetailsService;
import com.big.app.vo1.R;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ShoppingDetailsImpl implements ShoppingDetailsService {

    @Resource
    private ShoppingDetailsDao dao;
    @Override
    public R select(ShoppingDetails shoppingDetails) {
        String s = shoppingDetails.getShoppingnames();
        ShoppingDetails one = dao.selectOne(new QueryWrapper<ShoppingDetails>().eq("shoppingnames", s));

        if (one == null){
            return new R(400,"false","网络加载异常");
        }else {
            return new R(200,"ok",one);
        }
    }
}
